package edu.bu.cs673.superkids123.parents.controller;

import java.util.List;

import edu.bu.cs673.superkids123.AbstractController;
import edu.bu.cs673.superkids123.AbstractFrame;
import edu.bu.cs673.superkids123.common.DataObjectAccess.ChildManager;
import edu.bu.cs673.superkids123.common.model.Child;
import edu.bu.cs673.superkids123.common.model.User;
import edu.bu.cs673.superkids123.parents.view.ChangeChildView;
import edu.bu.cs673.superkids123.parents.view.DeleteChildView;
import edu.bu.cs673.superkids123.parents.view.ParentSettingsView;

public class EditChildController extends AbstractController{

	// TODO: Set a private static variable to hold the child to edit.
	private static Child current=new Child();
		
	public EditChildController(AbstractFrame mainFrame) {
		super(mainFrame);
	}

	public void editUser(Child child) {
		current=child;
		getMainFrame().changeView(ChangeChildView.class);
	}
	
	public void deleteUser(Child child){
		current=child;
		getMainFrame().changeView(DeleteChildView.class);
	}
	
	public List<Child> getAllChildren() {
		return ChildManager.getChildren();
	}
	
	// TODO: Set a method to received a passed in Child to load the form with.
	public Child loadChangeChild() {
		// TODO: load child to static private variable (test to make sure it's not null)
		return current;
		// TODO: call you view to load
	}
}
